package be.donovan.gui;

import java.awt.BorderLayout;
import java.lang.reflect.Field;
import java.util.Map;

import javax.swing.JTextField;

import be.donovan.gui.helper.components.MVCPanel;
import be.donovan.model.Product;

public class ProductScreen extends MVCPanel {
	private Map<Field, JTextField> mappings;
	@Override
	public void afterPropertiesSet() throws Exception {
		setLayout(new BorderLayout());
		mappings = addGenericInputPanel(this,Product.class, "id");
		super.afterPropertiesSet();
	}
	public Map<Field, JTextField> getMappings() {
		return mappings;
	}
	public void mapToObject(Product product) {
		mapToObject(product, mappings);
	}

}
